import '../public/index'
import store from 'store'

let data = new Vue({
  el: '#data',
  data: () => ({
    idStr          : '',
    deviceName     : '',
    buildingName   : '',
    status         : '',
    flag           : '',
    publishMode    : '',
    publishVersion : '',
    isSendMsg      : '',
    mobiles        : '',
    url            : '',
    remark         : ''
  }),
  mounted: function() {
    let storeData = store.get('storeData')

    if (!storeData) {
      layer.msg('页面跳转错误', {
        icon: 5
      })

      setTimeout(() => {
        window.location = './index.html'
      }, 1000)

      return
    }

    // 合并数据
    $.extend(this.$data, storeData)
  }
})

